{% extends "_layouts/edit.html" -%}

{% block body %}
{{ form::input(name="site_name", title="网站名称", value=row.site_name, length=380) }}
{{ form::input(name="site_url", title="网站网址", value=row.site_url, length=380) }}
{{ form::textarea(name="seo_keyword", title="SEO说明", value=row.seo_keyword) }}
{{ form::textarea(name="seo_desc", title="SEO描述", value=row.seo_desc) }}
{{ form::textarea(name="copyright", title="版权信息", value=row.copyright) }}
<script>
layui.validators = { 
    site_name: function(value) { 
        if (/^\s+$/.test(value)) { 
            return '必须输入网站名称';
        }
    },
    site_url: function(value) { 
        if (/^\s+$/.test(value)) { 
            return '必须输入网站网址';
        }
    },
    site_keyword: function(value) { 
        if (value.length > 200) { 
            return 'SEO说明不能超过200个字符';
        }
    },
    site_desc: function(value) { 
        if (value.length > 200) { 
            return '网站描述不能超过200个字符';
        }
    },
    copyright: function(value) { 
        if (value.length > 200) { 
            return '版权信息不能超过200个字符';
        }
    }
};
</script>
{% endblock body -%}
